-
Notifications
You must be signed in to change notification settings - Fork 508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tsdx lint command #99
Conversation
Use it to lint itself
Sickkkkk |
This looks great. Will give it try in the morning |
@skvale I think these rules are a bit too tight. Can we just use |
@jaredpalmer I made {
extends: ['react-app'],
}; For tsdx, I ran module.exports = {
extends: [
'react-app',
'prettier/@typescript-eslint',
'plugin:prettier/recommended',
],
}; We could document the ways of customizing the rules/extensions through
in the README |
Since we install prettier for people, we should setup eslint to play nicely? Does eslint config react app do that? |
Yep, I'm pretty sure prettier and eslint-config-react-app work well together. How about adding a |
Run it by default. The less flags the better |
🎉Nice! Can we add a What's the thinking behind providing a separate |
Waiting for
|
Let's resolve conflicts and get this merged? |
@jaredpalmer Sounds good and bumped to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In vs code, eslint does't lint typescript file by default.Do we need a vscode settings file to make eslint lint ts file?
package.json
Outdated
"ansi-escapes": "^3.2.0", | ||
"asyncro": "^3.0.0", | ||
"babel-eslint": "^10.0.2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this necessary?
I think use the @typescript-eslint/parser
parser is enough.
@leohxj I had to do two things to get eslint to work in vscode. This page for create-react-app explains it well too: https://facebook.github.io/create-react-app/docs/setting-up-your-editor
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
], |
Is this g2g? |
yeah, I think so |
Not for this PR, but we may want to think through some kind of upgrade and/or validation command. This would check package.json, dotfile config, tsconfig, eslint etc. and fill in (and/or reset) any missing pieces. IIRC, jest has something like this called like jest-validate?. |
tsdx lint
commandtsdx lint
to lint itself